package com.wl.common.system.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.wl.common.mybatis.model.AbstractBaseDeleteModel;
import com.wl.common.core.constant.ConstantSystem;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Table;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * @author: wanglin
 * @date: 2023-09-18 周一
 * @Version: 1.0
 * @Description:
 */
@NoArgsConstructor
@Data
@EqualsAndHashCode(callSuper = true)
@Entity(name = SysRoleResource.TABLE_NAME)
@Table(appliesTo = SysRoleResource.TABLE_NAME, comment = "后台角色资源关系表")
@TableName(value = SysRoleResource.TABLE_NAME)
public class SysRoleResource extends AbstractBaseDeleteModel {
    public static final String TABLE_NAME = ConstantSystem.TABLE_PREFIX + "role_resource";

    @Column(columnDefinition = "varchar(32) comment '角色id'")
    private String roleId;
    @Column(columnDefinition = "varchar(32) comment '资源id'")
    private String resourceId;

    public SysRoleResource(String roleId, String resourceId) {
        this.roleId = roleId;
        this.resourceId = resourceId;
    }
}